import Vue from 'vue';
import App from './App.vue';
import Antd from 'ant-design-vue';
import Loading from '@/components/Loading';

import router from '@/router';
import store from './store';

import 'ant-design-vue/dist/antd.css'; // antd样式
import '@/styles/index.scss'; // 全局样式

// 设置loading提示符
Loading.setDefaultIndicator({
  indicator: (h) => {
    return <a-icon type='smile' style='font-size: 24px' spin />;
  }
});

Vue.use(Antd);
Vue.use(Loading); // 使用v-loading指令

Vue.config.productionTip = false;
Vue.config.devtools = process.env.NODE_ENV === 'development';

const app = new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app');

window.__VUE_DEVTOOLS_GLOBAL_HOOK__.Vue = app.constructor;
